package com.wanxing.sellerapp.emqx.entity;

import com.alibaba.fastjson.JSONObject;
import com.wanxing.sellerapp.emqx.enums.ActionEnum;

public class LogEmqMessage extends EmqMessage{

    {
        action = ActionEnum.LOG;
        timestamp = System.currentTimeMillis();
        data = new JSONObject();
    }

    private String type;

    private JSONObject log;


    public LogEmqMessage(String type, JSONObject log) {
        this.type = type;
        this.log = log;
    }

    @Override
    public JSONObject getData() {
        data.put("type", type);
        data.put("log", log);
        return data;
    }



}
